package com.guessnumber.guess.chestinterface;

import org.bukkit.inventory.ItemStack;

public class returnitemstack {
    static public ItemStack[] returnitemstack(int i){
        items item = new items();
        ItemStack[] res = {item.item_,item.item_,item.item_};
        if (i < 10){
            switch (i){
                case 0 : res[0] = item.item1;break;
                case 1 : res[0] = item.item2;break;
                case 2 : res[0] = item.item3;break;
                case 3 : res[0] = item.item4;break;
                case 4 : res[0] = item.item5;break;
                case 5 : res[0] = item.item6;break;
                case 6 : res[0] = item.item7;break;
                case 7 : res[0] = item.item8;break;
                case 8 : res[0] = item.item9;break;
                default : res[0] = item.item10;break;
            }
        }
        else {
            int ge = i % 10;
            i /= 10;
            int shi = i % 10;
            i /= 10;
            int bai = i;
            res[0] = returnitemstack(ge)[0];
            res[1] = returnitemstack(shi)[0];
            res[2] = returnitemstack(bai)[0];
        }
        return res;
    }
}
